package licode.unisop.types;

/**
 * 认证中心常量定义
 *
 * @author licode
 */
public class AuthConst {
    public static final int USER_NOT_LOGIN = 101000;
    public static final String DEFAULT_ID = "default";

    public static final String SYSTEM_ADMIN = "system:admin";
    
    public static final String ASSET_SERVER = "ASSET";
    public static final String REALM_SERVER = "REALM";
    public static final String PLATFORM_SERVER = "PLATFORM";
    public static final String DEF_PASSWORD = "12345678";
    public static final String UNI_MASTER_SESSION = "UNI_MASTER_SESSION_ID";
    public static final String UNI_SUB_SESSION = "UNI_SUB_SESSION_ID";

    public static final String USER_NOT_LOGIN_MSG = "用户未登录";

    /**
     * 验证码有效期（秒）
     */
    public static final long CAPTCHA_EXPIRATION = 120;

    public static final Integer IS_SYSTEM = 1;

    // 主会话cookie超时时间：单位秒
    public static final int MASTER_COOKIE_TIMEOUT = 60 * 60 * 24 * 30;

    // cookie超时时间：单位秒
    public static final int COOKIE_TIMEOUT = 300;

    // 登录令牌续期时间（单位秒）
    public static final int ACCESS_TOKEN_RENEW_TIME = 300;

    public static final String SKIP_LOG_RECORD = "skip_log_record";

    public static final String SSO_CLIENT_ID = "sso_center";
    public static final String SSO_CLIENT_SECRET = "123456";

    public static final String SSO_MANAGER_PLATFORM_ID = "sso_manager_platform";
    public static final String SSO_PLATFORM_ID = "sso_center_platform";
    public static final String SSO_PLATFORM_SECRET = "123456";

    public static final String SSO_AUTH_TOKEN_KEY = "sso_auth_token";

    public static final String REALM_ID = "realm_id";
    public static final String CLIENT_ID = "client_id";
    public static final String TERMINAL_ID = "terminal_id";
    public static final String GRANT_TYPE = "grant_type";
    public static final String CLIENT_SECRET = "client_secret";
    public static final String SCOPE = "scope";

    public static final String CODE = "code";
    public static final String TICKET = "ticket";
    public static final String SSO_MODE = "sso_mode";

    public static final String PLATFORM = "platform";

    public static final String MODAL_TOKEN = "modal_token";
    public static final String PLATFORM_TOKEN = "platform";
    public static final String INNER_TOKEN = "inner_token";
    public static final String ACCESS_TOKEN = "access_token";
    public static final String MASTER_ACCESS_TOKEN = "master_access_token";
    public static final String REFRESH_TOKEN = "refresh_token";
    public static final String TENANT_ID = "tenant_id";
    public static final String PLATFORM_ID = "platform_id";
    public static final String PLATFORM_SECRET = "platform_secret";

    public static final String TICKET_URL = "ticket_url";
    public static final String REDIRECT_URL = "redirect_url";
    public static final String LOCATION_URL = "location_url";
    public static final String AUTH_ERROR_CODE = "auth_error_code";

    public static final String CATEGORY = "category";
    public static final String USERNAME = "username";
    public static final String PASSWORD = "password";

    public static final String CENTER_FILTER = "/sso-center/api";
    public static final String AUTH_UI_FILTER = "/auth-ui/sso";

    public static final String PASSWORD_DEFAULT = "Licode20";

    public static final String AUTHORIZATION_CODE = "authorization_code";
    public static final String CLIENT_CREDENTIALS = "client_credentials";
    public static final String IMPLICIT = "implicit";
}
